package com.xhxg.dao;

import com.xhxg.pojo.Customer;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

//mybatis注解开发
public interface CustomerAnnonMapper {

    @Select("select * from t_customer where id=#{id}")
    Customer selectCustomer(int id);


    @Insert("insert into t_customer(id,username,jobs,phone) values(#{id},#{username},#{jobs},#{phone})")
    int insertCustomer(Customer customer);

    @Update("update t_customer set username = #{username},jobs = #{jobs} where id = #{id}")
    int updateCustomer(Customer customer);


    @Delete("delete from t_customer where id = #{id}")
    int deleteCustomer(int id);
}
